//
//  YSAVPlayerHelper.m
//  YSPlayer_iOS
//
//  Created by 宋宏康 on 2020/2/12.
//

#import "YsNoteSDKHelper.h"
NSString *const kResourcesBundleName = @"YsNoteSDK";

@implementation YsNoteSDKHelper


+ (UIImage *)imageWithName:(NSString *)name {
    UIImage *image = [UIImage imageNamed:name inBundle:self.getCurentBundle compatibleWithTraitCollection:nil];
    return image;
}

+ (NSBundle *)getCurentBundle
{
    static NSBundle *resourceBundle = nil;
    if (!resourceBundle) {
          NSBundle *mainBundle = [NSBundle bundleForClass:self];
          NSString *resourcePath = [mainBundle pathForResource:kResourcesBundleName ofType:@"bundle"];
          resourceBundle = [NSBundle bundleWithPath:resourcePath] ?: mainBundle;
      }
    return resourceBundle;
}
@end
